/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：NpcMenuButton.java <br>
 * 创建时间：2013-7-23 下午2:46:59 <br>
 * 所属项目：GmudEX <br>
 *
 * @author 12548 <br>
 */
package lostland.gmud.exv2.ui;

import lostland.gmud.exv2.FontSize;
import lostland.gmud.exv2.Game;
import lostland.gmud.exv2.blgframework.impl.BLGGraphics;
import lostland.gmud.exv2.ui.core.BlockButton;

/**
 * 类名：NpcMenuButton <br>
 * 说明：
 *
 * @author 12548
 */
public class NpcMenuButton extends BlockButton {

	public static final int MARGIN_TOP = 1;
	public static final int MARGIN_LEFT = 1;

	public static final int WIDTH = 37;
	public static final int HEIGHT = 13;

	int npcid;
	int index;

	static final String S[] = {"交谈", "查看", "战斗", "交易", "拜师", "请教", "休息", "更新", "离婚", "存档", "读档",
			"结婚", "反馈", "打赏"};

	/**
	 * @param instance
	 * @param x
	 * @param y
	 * @param width
	 * @param height
	 */
	public NpcMenuButton(int index, int pos) {
		super(NpcMenuBorder.LEFT + MARGIN_LEFT, NpcMenuBorder.TOP + MARGIN_TOP + HEIGHT * (pos),
				WIDTH, HEIGHT);
		this.index = index;
	}

	/*
	 * （非 Javadoc）
	 * @see lostland.gmud.exv2.ui.GmudWindow#draw()
	 */
	@Override
	public void draw() {
		drawBackground();
		BLGGraphics g = (BLGGraphics) Game.getInstance().getGraphics();
		g.drawText(S[index], x + 12, y, FontSize.FT_12PX);
	}

}
